home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / math / pspnum / demo / pspd1f4.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-06-03  |  27.3 KB  |  624 lines

  1. NumArOp
  2. Operations for Numeric Arrays
  3. Form25G
  4. OverflowNumAr3
  5. Overflow = Error
  6. NumAr3
  7. PSPNUM
  8. MS Sans Serif
  9. NumAr2
  10. PSPNUM
  11. MS Sans Serif
  12. NumAr1
  13. PSPNUM
  14. MS Sans Serif
  15. CmdNumAr3Previous
  16. CmdNumAr3Next
  17. CmdNumAr2Next
  18. CmdNumAr2Previous
  19. CmdNumAr1Next
  20. CmdNumAr1Previous
  21. RoundNumAr3
  22. Round
  23. CmdOkay
  24. Do Operation
  25. CmdReset
  26. Reset
  27. ArOpSelect
  28.     CmdCancel
  29. Cancel
  30. LabelAudAr3
  31. ---Ar3 Audit---
  32. LabelAudAr2
  33. ---Ar2 Audit---
  34. LabelAudAr1
  35. ---Ar1 Audit---
  36. ArVal35
  37. MS Sans Serif
  38. ArVal34
  39. MS Sans Serif
  40. ArVal33
  41. MS Sans Serif
  42. ArVal32
  43. MS Sans Serif
  44. ArVal31
  45. MS Sans Serif
  46. ArVal23
  47. MS Sans Serif
  48. ArVal22
  49. MS Sans Serif
  50. ArVal21
  51. MS Sans Serif
  52. ArVal14
  53. MS Sans Serif
  54. ArVal13
  55. MS Sans Serif
  56. ArVal12
  57. MS Sans Serif
  58. ArVal11
  59. MS Sans Serif
  60. NumAr3Comp
  61. LabelNumAr3
  62. PSPNumAr3: 5 x 5+2
  63. LabelNumAr2
  64. PSPNumAr2: 3 x 3+1
  65. LabelNumAr1
  66. PSPNumAr1: 4 x 3+3
  67.     ArOpLabel
  68. NumAr3 Operation:
  69. @Q@Qu
  70. @    Form_Load
  71. Command1_Click
  72. NumArOp
  73. ArOpSelect_Change|
  74. ArOpSelectD
  75.     SoAddItemq
  76. Assn2
  77. NumAr14_Change
  78. NumAr12_Change
  79. ArVal23_Change
  80. CmdCancel_ClickB
  81. ArOp$
  82. MB_EXCLAIM
  83. CmdOkay_Click
  84. CmdOkayError
  85. Num3v
  86. OperID1
  87. VarID|
  88. OperID2
  89. Num2(
  90. OperComp
  91. Num3Comp 
  92. Caption
  93. Visible
  94. NumAr3
  95. NumAr19
  96. NumAr2
  97. NumAr3Comp4
  98. CmdNumAr1Next_Click
  99. NumArHi
  100. NumAr1Hi
  101. ArVal11
  102. display
  103. FontBoldK
  104. CmdNumAr2Next_Clickj
  105. CmdNumAr1Previous_Click
  106. ArVal12
  107. ArVal13
  108. ArVal14
  109. automaticallyt
  110.     refreshesO
  111. OperElem
  112. NumAr1_LostFocus/
  113.     ForeColor~
  114. ntBold
  115. HiColor
  116.     H00C0C0C0
  117. HI_COLOR
  118. FontItalici
  119. ArVal14_Change"
  120. FontUnderline
  121. Base(
  122. NumAr
  123.     Dimension
  124. VarBase;
  125. VarDimension
  126. VarBase2l
  127. PSPNUM
  128. control
  129. ArVal24
  130. ArVal21
  131. ArVal22
  132. ArVal23-
  133. CmdNumAr3Next_Click
  134. ArVal31v
  135. ArVal32
  136. ArVal332
  137. ArVal34
  138. ArVal35Z
  139. VarBaseVarBaseB
  140. SetAr1HiLightM
  141. based9
  142. currentU
  143.     displayed
  144. Value
  145. ArVal31_Change
  146. ArVal32_Change
  147. ArVal12_Change
  148. ArVal21_Change
  149. ArVal35_Change
  150. CmdNumAr3Previous_Click
  151. SetAr2HiLight,
  152. CmdNumAr2Previous_Click[
  153. SetAr3HiLightl
  154. ArVal11_Click
  155. SetAr1Valuese
  156.     Highlight
  157. contents
  158. ArVal1
  159. ensure=
  160. Element
  161. highlighted
  162. NumArElemSaA
  163. NumArElemSav
  164. SetAr2Values
  165. SetAr3Values
  166. Arrays
  167. SetAr3CurValue
  168. SetAr1CurValueX
  169. SetAr2CurValue)
  170. NumAr2_LostFocus
  171. NumAr3_LostFocus
  172. cases
  173. setting
  174. required
  175. CmdReset_Click
  176. ResetNumAr1
  177. ResetNumAr2
  178. ResetNumAr3
  179. initof
  180. ArOpSelect_Click
  181. ArOpSelect_DblClickK
  182. RoundNumAr1_Click<
  183.     RoundNum1
  184.     OperRound
  185. RoundNumAr1o
  186. RoundNumAr2_Click
  187. RoundNumAr2
  188. RoundNumAr3_Click
  189. RoundNumAr3
  190. characters
  191. selected
  192. firstN
  193. scannedd
  194. matching
  195. ArVal21_Click
  196. ArVal11_DblClick
  197. ArVal12_Click%
  198. ArVal12_DblClick6
  199. ArVal13_ClickJ
  200. ArVal13_DblClick[
  201. ArVal14_Clicko
  202. ArVal14_DblClick
  203. ArVal21_DblClick
  204. ArVal22_Click
  205. ArVal22_DblClick
  206. ArVal23_Click
  207. ArVal23_DblClick
  208. ArVal31_Click
  209. ArVal31_DblClick
  210. ArVal32_Click
  211. ArVal32_DblClick(    @
  212. ArVal33_Click<    @
  213. ArVal33_DblClickM    @
  214. ArVal34_Clicka    @
  215. ArVal34_DblClickr    @
  216. ArVal35_Click
  217. ArVal35_DblClick
  218. Label1_Click
  219. prevent
  220. iterate
  221. property
  222.     MessageXX
  223. MB_OKMessageXXv
  224. MB_OKY
  225. EQStartPos'
  226. VarValue/
  227. unformatted
  228. rather:
  229. Refesh
  230.     formatted
  231. because
  232. ArrayElement
  233.     ArrayBase
  234.     ArrayElem
  235. ArrayDimension
  236. NumIDR
  237. NumID1(
  238. NumID2
  239.     Operation
  240. CompareResult
  241. ValueString
  242. Round
  243. Arrayase
  244. ArrayValue
  245. AutoRefresh
  246. FalseOperation
  247. OverflowNumAr3_Click
  248. OverflowNumAr3
  249. OverflowError
  250.  Operation selected via combo-box.
  251.  Exclamation icon for message box.
  252.  Okay button icon for message box.
  253.  Define boolean switch for message box
  254.  displayed once only
  255. ArOpSelect_Change
  256. ArOpSelect_Click
  257. ArOpSelect_DblClick
  258. ArVal11_Click
  259.  Set current element of NumAr1 (automaticallyl
  260.  refreshes displayed value in the PSPNUM control)l
  261.  Reset highlight for edit boxes 
  262.  Focus on corresponding PSPNUM control.
  263. ArVal11_DblClick
  264.  Set current element of NumAr1 (automatically)
  265.  refreshes displayed value in the PSPNUM control)h
  266.  Reset highlight for edit boxesh
  267.  Focus on corresponding PSPNUM control.
  268. ArVal12_Click
  269.  Set current element of NumAr1 (automaticallyr
  270.  refreshes displayed value in the PSPNUM control)h
  271.  Reset highlight for edit boxesh
  272.  Focus on corresponding PSPNUM control.
  273. ArVal12_DblClick
  274.  Set current element of NumAr1 (automaticallyr
  275.  refreshes displayed value in the PSPNUM control)h
  276.  Reset highlight for edit boxesh
  277.  Focus on corresponding PSPNUM control.
  278. ArVal13_Click
  279.  Set current element of NumAr1 (automaticallyr
  280.  refreshes displayed value in the PSPNUM control)h
  281.  Reset highlight for edit boxesh
  282.  Focus on corresponding PSPNUM control.
  283. ArVal13_DblClick
  284.  Set current element of NumAr1 (automaticallyr
  285.  refreshes displayed value in the PSPNUM control)h
  286.  Reset highlight for edit boxesh
  287.  Focus on corresponding PSPNUM control.
  288. ArVal14_Click
  289.  Set current element of NumAr1 (automaticallyr
  290.  refreshes displayed value in the PSPNUM control)h
  291.  Reset highlight for edit boxesh
  292.  Focus on corresponding PSPNUM control.
  293. ArVal14_DblClick
  294.  Set current element of NumAr1 (automaticallyr
  295.  refreshes displayed value in the PSPNUM control)h
  296.  Reset highlight for edit boxesh
  297.  Focus on corresponding PSPNUM control.
  298. ArVal21_Click
  299.  Set current element of NumAr2 (automaticallyc
  300.  refreshes displayed value in the PSPNUM control)h
  301.  Reset highlight for edit boxesh
  302.  Focus on corresponding PSPNUM control.
  303. ArVal21_DblClick
  304.  Set current element of NumAr2 (automaticallyc
  305.  refreshes displayed value in the PSPNUM control)h
  306.  Reset highlight for edit boxesh
  307.  Focus on corresponding PSPNUM control.
  308. ArVal22_Click
  309.  Set current element of NumAr2 (automaticallyc
  310.  refreshes displayed value in the PSPNUM control)h
  311.  Reset highlight for edit boxesh
  312.  Focus on corresponding PSPNUM control.
  313. ArVal22_DblClick
  314.  Set current element of NumAr2 (automaticallyc
  315.  refreshes displayed value in the PSPNUM control)h
  316.  Reset highlight for edit boxesh
  317.  Focus on corresponding PSPNUM control.
  318. ArVal23_Click
  319.  Set current element of NumAr2 (automaticallyc
  320.  refreshes displayed value in the PSPNUM control)y
  321.  Reset highlight for edit boxesh
  322.  Focus on corresponding PSPNUM control.
  323. ArVal23_DblClick
  324.  Set current element of NumAr2 (automaticallyr
  325.  refreshes displayed value in the PSPNUM control)y
  326.  Reset highlight for edit boxesh
  327.  Focus on corresponding PSPNUM control.
  328. ArVal31_Click
  329.  Set current element of NumAr3 (automaticallyr
  330.  refreshes displayed value in the PSPNUM control)y
  331.  Reset highlight for edit boxesh
  332.  Focus on corresponding PSPNUM control.
  333. ArVal31_DblClick
  334.  Set current element of NumAr3 (automaticallyr
  335.  refreshes displayed value in the PSPNUM control)y
  336.  Reset highlight for edit boxesh
  337.  Focus on corresponding PSPNUM control.
  338. ArVal32_Click
  339.  Set current element of NumAr3 (automaticallyr
  340.  refreshes displayed value in the PSPNUM control)y
  341.  Reset highlight for edit boxesh
  342.  Focus on corresponding PSPNUM control.
  343. ArVal32_DblClick
  344.  Set current element of NumAr3 (automaticallyr
  345.  refreshes displayed value in the PSPNUM control)y
  346.  Reset highlight for edit boxesh
  347.  Focus on corresponding PSPNUM control.
  348. ArVal33_Click
  349.  Set current element of NumAr3 (automaticallyr
  350.  refreshes displayed value in the PSPNUM control)y
  351.  Reset highlight for edit boxesh
  352.  Focus on corresponding PSPNUM control.
  353. ArVal33_DblClick
  354.  Set current element of NumAr3 (automaticallyr
  355.  refreshes displayed value in the PSPNUM control)y
  356.  Reset highlight for edit boxesh
  357.  Focus on corresponding PSPNUM control.
  358. ArVal34_Click
  359.  Set current element of NumAr3 (automaticallyr
  360.  refreshes displayed value in the PSPNUM control)y
  361.  Reset highlight for edit boxesh
  362.  Focus on corresponding PSPNUM control.
  363. ArVal34_DblClick
  364.  Set current element of NumAr3 (automaticallyr
  365.  refreshes displayed value in the PSPNUM control)y
  366.  Reset highlight for edit boxesh
  367.  Focus on corresponding PSPNUM control.
  368. ArVal35_Click
  369.  Set current element of NumAr3 (automaticallyr
  370.  refreshes displayed value in the PSPNUM control)y
  371.  Reset highlight for edit boxesh
  372.  Focus on corresponding PSPNUM control.
  373. ArVal35_DblClick
  374.  Set current element of NumAr3 (automaticallyr
  375.  refreshes displayed value in the PSPNUM control)y
  376.  Reset highlight for edit boxesh
  377.  Focus on corresponding PSPNUM control.
  378. CmdCancel_Click
  379. CmdNumAr1Next_Click
  380.  Increment current element of NumAr1 (automatically 
  381.  refreshes displayed value in the PSPNUM control))
  382.  Then highlight corresponding edit box
  383. CmdNumAr1Previous_Click
  384.  Decrement current element of NumAr1 (automatically 
  385.  refreshes displayed value in the PSPNUM control))
  386.  Then highlight corresponding edit box
  387. CmdNumAr2Next_Click
  388.  Increment current element of NumAr2 (automatically 
  389.  refreshes displayed value in the PSPNUM control))
  390.  Then highlight corresponding edit box.M
  391. CmdNumAr2Previous_Click
  392.  Decrement current element of NumAr2 (automatically
  393.  refreshes displayed value in the PSPNUM control)l
  394.  Then highlight corresponding edit box.M
  395. CmdNumAr3Next_Click
  396.  Increment current element of NumAr3 (automatically 
  397.  refreshes displayed value in the PSPNUM control))
  398.  Then highlight corresponding edit box.n
  399. CmdNumAr3Previous_Click
  400.  Decrement current element of NumAr3 (automatically
  401.  refreshes displayed value in the PSPNUM control)l
  402.  Then highlight corresponding edit box.M
  403. CmdOkay_Click
  404.  Test boolean switch for message box
  405.  displayed once only
  406. Please Note: All operations containing 'EQ' can have any logical operator EQ/NE/GT/GE/LT/LE.
  407.  Set up simple error-handler
  408.  Perform operation selected via combo-box. In 
  409.  all cases, setting value of 'Oper' triggers e
  410.  the required function for the PSPNUM NumAr3
  411.  e.g. the value of Num3 is updated. 
  412.  Operations require NumID1 or NumID2 ori
  413.  both. In this generic routine, always set 
  414.  both even if only one is used..
  415.  Now refresh text box displays for all 
  416.  elements of NumAr3 (could be more selective
  417.  e.g. only one element may have been updated).
  418.  Reset value of TRUE/FALSE display if first twon
  419.  characters of ArOp are 'is' i.e. logical operationp
  420.  selected.
  421. Comp:     TRUE
  422. Comp:     FALSE
  423.  Reset value of TRUE/FALSE display if first twon
  424.  characters of ArOp are 'lookup' i.e. array being 
  425.  scanned for matching value. In this case also
  426.  refresh display for matched element (if any).
  427. lookup
  428. Comp:     TRUE
  429. Comp:     FALSE
  430.  Otherwise suppress display of comp true/false..
  431.  Simple error-handler: displays message box
  432.  and continues with next statement.s
  433. Trapped Error 
  434. CmdReset_Click
  435.  Reset values recorded in all elements
  436.  of 3 PSPNUM controls.
  437.  Redisplay reset values in text boxess
  438.  for all array elements.
  439. Form_Load
  440.  Initialise boolean switch for message box
  441.  displayed once only
  442.  Initialise combo box options. e
  443. Add12
  444. AddAll1
  445. AddAll2
  446. AddAll12
  447. AssnRem
  448. AssnZero
  449. AssnAllZero
  450. Assn1
  451. Assn2
  452. AssnAll1
  453. AssnAll2
  454. Div12
  455. DivAll1
  456. DivAll2
  457. DivAll12
  458. DivRem12
  459. IsEQzero
  460. IsEQ1
  461. IsEQ2
  462. IsAllEQZero
  463. IsAllEQ1
  464. IsAllEQ2
  465. LookUpEQ1
  466. LookUpEQ2
  467. Mult1
  468. Mult2
  469. Mult12
  470. MultAll1
  471. MultAll2
  472. MultAll12
  473. SortA
  474. SortD
  475. Sub12
  476. SubAll1
  477. SubAll2
  478. SubAll12
  479. SumAr1
  480. SumAr2
  481.  Initialise default option in combo box.
  482.  Initialise global variable for Selected Operation
  483.  Set internal rounding property for PSPNUM object
  484.  (simulate click on corresponding check box).o
  485.  Initialise 3 PSPNUM objects with default values.n
  486.  (Uses AutoRefresh property).a
  487.  Set initial display for all array values.
  488.  (Uses AutoRefresh property).
  489.  Then highlight corresponding text boxes (generally
  490.  first element for each NumAr unless different
  491.  value of 'OperElem' initialised at design-time).l
  492. NumAr1_LostFocus
  493.  Refresh value of current element to
  494.  appropriate text box.
  495. NumAr2_LostFocus
  496.  Refresh value of current element to
  497.  appropriate text box.
  498. NumAr3_LostFocus
  499.  Refresh value of current element to
  500.  appropriate text box.
  501. OverflowNumAr3_Click
  502.  Checked
  503.  Unchecked
  504.  Grayed - ignore
  505. ResetNumAr1
  506.  Set/reset default values in NumAr1.
  507.  First save current element of NumAr1x
  508.  Set No Refresh (to prevent Text propertyp
  509.  flashing during iteration below).
  510.  Iterate through all elements, assigning to ValueStringt
  511.  (unformatted) rather than to Text (formatted)
  512. -6.555
  513. 984.310
  514. 2.731
  515. -100.0
  516.  Restore current element of NumAr1
  517.  Set Refresh (to reinstate Text property display).
  518. ResetNumAr2
  519.  Set/reset default values in NumAr2.
  520.  First save current element of NumAr2u
  521.  Set No Refresh (to prevent Text propertyp
  522.  flashing during iteration below).
  523.  Iterate through all elements, assigning to ValueStringt
  524.  (unformatted) rather than to Text (formatted)
  525. -100.6
  526. 942.1
  527.  Restore current element of NumAr2
  528.  Set Refresh (to reinstate Text property display).
  529. ResetNumAr3
  530.  Set/reset default values in NumAr3.
  531.  First save current element of NumAr3u
  532.  Set No Refresh (to prevent Text propertyp
  533.  flashing during iteration below).
  534.  Iterate through all elements, assigning to ValueStringt
  535.  (unformatted) rather than to Text (formatted)
  536. -6.35
  537. 59626.78
  538. 42.18
  539. 250.00
  540.  Restore current element of NumAr3
  541.  Set Refresh (to reinstate Text property display).
  542. RoundNumAr3_Click
  543.  Checked
  544.  Unchecked
  545.  Grayed - ignore
  546. SetAr1CurValue
  547.  Refresh value in ArVal1 edit box from current element m
  548.  of NumAr1. Refesh from ValueString (unformatted) rather
  549.  than Text (formatted), because AutoRefresh FALSE used in
  550.  this example.
  551.  Note variables numbered relative to Baser
  552.  and Dimension in case either changes in future.
  553. SetAr1HiLight
  554.  Highlight the contents of the ArVal1 edit box
  555.  corresponding to the current element of NumAr1.
  556.  First ensure no element is highlighted.
  557.  Reset display to highlight current element.
  558.  Note variables numbered relative to BaseN
  559.  and Dimension in case either changes in future.
  560. SetAr1Values
  561.  Refresh all values in ArVal1 edit boxes fromr
  562.  corresponding elements of NumAr1. e
  563.  First save current element of NumAr1
  564.  Set No Refresh (to prevent Text propertyp
  565.  flashing during iteration below).
  566.  Iterate through all elements - assigning
  567.  from ValueString (unformatted) rather than 
  568.  from Text (formatted) because Text is
  569.  not currently being refreshed.T
  570.  Restore current element of NumAr1
  571.  Set Refresh (to reinstate Text property display).
  572. SetAr2CurValue
  573.  Refresh value in ArVal2 edit box from current element
  574.  of NumAr2. Refesh from ValueString (unformatted) rather
  575.  than Text (formatted), because AutoRefresh FALSE used in
  576.  this example.
  577.  Note variables numbered relative to Baser
  578.  and Dimension in case either changes in future.
  579. SetAr2HiLight
  580.  Highlight the contents of the ArVal2 edit box
  581.  corresponding to the current element of NumAr2.
  582.  First ensure no element is highlighted.
  583.  Reset display to highlight current element.
  584.  Note variables numbered relative to Basen
  585.  and Dimension in case either changes in future.
  586. SetAr2Values
  587.  Refresh all values in ArVal2 edit boxes fromh
  588.  corresponding elements of NumAr2.
  589.  First save current element of NumAr2x
  590.  Set No Refresh (to prevent Text propertyp
  591.  flashing during iteration below).
  592.  Iterate through all elements - assigning
  593.  from ValueString (unformatted) rather than 
  594.  from Text (formatted) because Text is
  595.  not currently being refreshed.T
  596.  Restore current element of NumAr2
  597.  Set Refresh (to reinstate Text property display).
  598. SetAr3CurValue
  599.  Refresh value in ArVal3 edit box from current element
  600.  of NumAr3. Refesh from ValueString (unformatted) rather
  601.  than Text (formatted), because AutoRefresh FALSE used in
  602.  this example.
  603.  Note variables numbered relative to Basef
  604.  and Dimension in case either changes in future.
  605. SetAr3HiLight
  606.  Highlight the contents of the ArVal3 edit box
  607.  corresponding to the current element of NumAr3.
  608.  First reset display for any highlighted element.n
  609.  Reset display to highlight current element.
  610.  Note variables numbered relative to BaseN
  611.  and Dimension in case either changes in future.
  612. SetAr3Values
  613.  Refresh all values in ArVal3 edit boxes fromh
  614.  corresponding elements of NumAr3.
  615.  First save current element of NumAr3x
  616.  Set No Refresh (to prevent Text propertyp
  617.  flashing during iteration below).
  618.  Iterate through all elements - assigning
  619.  from ValueString (unformatted) rather than 
  620.  from Text (formatted) because Text is
  621.  not currently being refreshed.T
  622.  Restore current element of NumAr3
  623.  Set Refresh (to reinstate Text property display).
  624.